local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script, CommonOHOH.files.BaseComponent());
local gCamrAtt=_G.ClientOHOH:GetPath_Loop("BroShow.root.CamCF",workspace)
local gCamera=gCamrAtt.WorldCFrame

function M.new(...)
	return M(...);
end;

function M.ctor(self,parent)
    M.super.ctor(self,parent);

    self.parent.EnterEvent:Connect(function(data)
        self:FixedCamera()
    end)

    self.parent.ExitEvent:Connect(function(data)
        self:ReleaseCamera()
    end)
end;


--固定相机位置
function M.FixedCamera(self)
	workspace.Camera.CameraType = Enum.CameraType.Scriptable
    workspace.Camera.CFrame=gCamera
end

--释放相机
function M.ReleaseCamera(self)
	workspace.Camera.CameraType = Enum.CameraType.Custom

end



function M.dtor(self)
    self.ui_inst:Destroy()
end;

return M